package ex2;

public class Numbers {
	
	private Integer [] numbers;
	
	public Numbers (){
		this.numbers = new Integer[3];
		for (int i = 0; i < numbers.length ; i++){
			numbers[i] = new java.util.Random().nextInt(899) + 100;
		}
	}

	public Integer[] getNumbers() {
		return this.numbers;
	}

	public void setNumbers(int[] numbers) {
		for (int i = 0; i < numbers.length; i++){
			this.numbers[i] = numbers[i];
		}
		
	}
	
	public String toString(){
		for (int i = 0; i < numbers.length; i++){
			System.out.print(numbers[i] + "  ");
		}
		
		System.out.println();
		return " ";
	}
	
	public int firstNumbersSum(){
		
		int sum = 0;
		
		for (int i = 0; i < numbers.length ; i++){
			sum += numbers[i]/100;
		}
		return sum;
	}
	

	

}
